﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MG.HomeO2O.BLL;
using MG.HomeO2O.Model;
namespace MG.HomeO2O.WebUI.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ShowDe()
        {
            MG.HomeO2O.BLL.DetailBLL bll = new MG.HomeO2O.BLL.DetailBLL();
            return Json(bll.ShowDetail(), JsonRequestBehavior.AllowGet);
        }
        public ActionResult home_working()
        {

            return View();
        }
        public ActionResult ShowJiazheng()
        {
            MG.HomeO2O.BLL.JiazhengBLL bll = new JiazhengBLL();
            return Json(bll.JiazhengShow(), JsonRequestBehavior.AllowGet);
        }
        /// <summary>
        /// 下拉框显示
        /// </summary>
        /// <returns></returns>
        public ActionResult xiala()
        {
            MG.HomeO2O.BLL.OrderBLL bll = new OrderBLL();
            return Json(bll.listshow(), JsonRequestBehavior.AllowGet);
        }
        public ActionResult Add()
        {
            Order p = new Order();
            p.Oaddr = Request["Oaddr"].ToString();
            p.Odemand = Request["Odemand"].ToString();
            p.OName = Request["OName"].ToString();
            p.OPhone = Request["OPhone"].ToString();
            p.Ostate = 0;
            p.Otime = DateTime.Now;
            p.Tid = Convert.ToInt32(Request["Tid"]);
            MG.HomeO2O.BLL.OrderBLL bll = new OrderBLL();
            if (bll.add(p) > 0)
            {
                return Content("True");
            }
            else
            {
                return Content("Fales");
            }
        }
        public ActionResult month_nurse()
        {
            return View();
        }

        //显示月嫂-服务介绍
        public ActionResult ShowJieshao()
        {
            MG.HomeO2O.BLL.MonthNurseBLL bll = new MonthNurseBLL();
            return Json(bll.ShowJieshao(), JsonRequestBehavior.AllowGet);
        }
        //服务价格
        public ActionResult ShowPrice()
        {
            MG.HomeO2O.BLL.MonthNurseBLL bll = new MonthNurseBLL();
            return Json(bll.ShowPrice(), JsonRequestBehavior.AllowGet);
        }
        //风采
        public ActionResult ShowFengcai()
        {
            MG.HomeO2O.BLL.MonthNurseBLL bll = new MonthNurseBLL();
            return Json(bll.ShowFengcai(), JsonRequestBehavior.AllowGet);
        }
       
        public ActionResult ShowPor()
        {
            MG.HomeO2O.BLL.ServiceporBLL bll = new ServiceporBLL();
            return Json(bll.listshow(), JsonRequestBehavior.AllowGet);
        }
        public ActionResult ShowPoror()
        {
            MG.HomeO2O.BLL.ServiceporBLL bll = new ServiceporBLL();
            return Json(bll.listshow1(), JsonRequestBehavior.AllowGet);
        }
        public ActionResult cuiru()
        {
            return View();
        }
        public ActionResult yuersao()
        {
            return View();
        }
        public ActionResult ShowYuersaojiazhi()
        {
            MG.HomeO2O.BLL.YueersaoBLL bll = new YueersaoBLL();
            return Json(bll.ShowYuersaojiazhi(), JsonRequestBehavior.AllowGet);
        }
        
        public ActionResult comp_introce()
        {
            return View();
        }
        public ActionResult fwcn()
        {
            return View();
        }
        public ActionResult insurance()
        {
            return View();
        }
        public ActionResult dome_news()
        {
            return View();
        }
        public ActionResult industry_active()
        {
            return View();
        }
        public ActionResult FAQ()
        {
            return View();
        }
        public ActionResult video_play()
        {
            return View();
        }
        public ActionResult contact()
        {
            return View();
        }
    }

}

